package GUI;

import java.awt.Font;
import javax.swing.JButton;

public class KundenBearbeiten extends GrundVorlageKunde{
	JButton btnSpeichern;
	JButton btnAbr;
	
public KundenBearbeiten(){
	init();
	MaskeEntgauen();
	
}

class MyMouseAdapter extends java.awt.event.MouseAdapter {
	public void mouseClicked(java.awt.event.MouseEvent event) {
		Object object = event.getSource();
		if(btnAbr == object){
			PanelWechsel.kundeAnz();
			
		}
		
	}
	}		
public void registerEvents() {
	MyMouseAdapter mouse = new MyMouseAdapter();
	btnAbr.addMouseListener(mouse);
}
public void MaskeEntgauen() {

	tfEmailGesch.setEditable(true);
	tfEmailPriv.setEditable(true);
	tfAnrede.setEditable(true);
	tfGeb.setEditable(true);
	tfLand.setEditable(true);
	tfMobil.setEditable(true);
	tfNr.setEditable(true);
	tfOrt.setEditable(true);
	tfPLZ.setEditable(true);
	tfPreis.setEditable(true);
	tfStr.setEditable(true);
	tfTelgesch.setEditable(true);
	tfTelPrvt.setEditable(true);
	tfVorname.setEditable(true);
	tfName.setEditable(true);
	
	comboBoxaktivitaet.setEnabled(true);
	comboBoxstatus.setEnabled(true);
	
	tpLetzterKontakt.setEnabled(true);
	tpSonstiges.setEnabled(true);
	tpStatus.setEnabled(true);
	
	btnAbr = new JButton("Abbruch");
	btnAbr.setFont(new Font("Lucida Sans", Font.PLAIN, 11));
	btnAbr.setBounds(600, 529, 100, 23);
	add(btnAbr);	
	
	btnSpeichern = new JButton("Speichern");
	btnSpeichern.setFont(new Font("Lucida Sans", Font.PLAIN, 11));
	btnSpeichern.setBounds(480, 529, 100, 23);
	add(btnSpeichern);
	
	
	

	
	registerEvents();
	
	
	
	}	
//public void fuelleTextFelder(String id) { 
//	System.out.println("Test1");
//	  
//    ArrayList<String> data = SQL_Abfragen.contentkunde(id);   
//    tfVorname.setText(data.get(0)); 
//    tfName.setText(data.get(1)); 
//    tfGeb.setText(data.get(2)); 
//    tfTelPrvt.setText(data.get(3)); 
//    tfTelgesch.setText(data.get(4)); 
//    tfMobil.setText(data.get(5)); 
//    tfEmailPriv.setText(data.get(6)); 
//    tfEmailGesch.setText(data.get(7));    
//    data.clear();
//}
}
